template <typename T>
Rect<T>::Rect(void)
	: position(0, 0)
	, size(0, 0)
{

}

template <typename T>
Rect<T>::Rect(T x, T y, T width, T height)
	: position(x, y)
	, size(width, height)
{

}

template <typename T>
template <typename U>
Rect<T>::Rect(tvec2<U> pos, tvec2<U> size)
	: position(static_cast<T>(pos.x), static_cast<T>(pos.y))
	, size(static_cast<T>(size.x), static_cast<T>(size.y))
{

}

template <typename T>
template <typename U>
Rect<T>::Rect(const Rect<U>& r)
	: position(static_cast<T>(r.position.x), static_cast<T>(r.position.y))
	, size(static_cast<T>(r.size.x), static_cast<T>(r.size.y))
{
}

template <typename T>
T Rect<T>::getArea(void) const
{
	return size.x * size.y;
}

template <typename T>
tvec2<T> Rect<T>::getCenter(void) const
{
	return position + vec2_t(0.5*size.x, 0.5*size.y);
}